summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2023-06-25 02:59:40 +0200
committergerman77 <juangerman-13@hotmail.com>2023-06-25 02:59:55 +0200
commitbf641e2964d513e9b9e3495c7d68d1c18c5b806e (patch)
tree7fbc1cbd7d8e122fa93b5dbf4b9c76c1ec78f87d
parentinput_common: Dont try to read/write data from 3rd party controllers (diff)
downloadyuzu-bf641e2964d513e9b9e3495c7d68d1c18c5b806e.tar
yuzu-bf641e2964d513e9b9e3495c7d68d1c18c5b806e.tar.gz
yuzu-bf641e2964d513e9b9e3495c7d68d1c18c5b806e.tar.bz2
yuzu-bf641e2964d513e9b9e3495c7d68d1c18c5b806e.tar.lz
yuzu-bf641e2964d513e9b9e3495c7d68d1c18c5b806e.tar.xz
yuzu-bf641e2964d513e9b9e3495c7d68d1c18c5b806e.tar.zst
yuzu-bf641e2964d513e9b9e3495c7d68d1c18c5b806e.zip
-rw-r--r--src/core/hid/emulated_controller.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 190f7c906..1ebc32c1e 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -1334,16 +1334,22 @@ bool EmulatedController::StartNfcPolling() {
auto& nfc_output_device = output_devices[static_cast<std::size_t>(DeviceIndex::Right)];
auto& nfc_virtual_output_device = output_devices[3];
- return nfc_output_device->StartNfcPolling() == Common::Input::NfcState::Success ||
- nfc_virtual_output_device->StartNfcPolling() == Common::Input::NfcState::Success;
+ const auto device_result = nfc_output_device->StartNfcPolling();
+ const auto virtual_device_result = nfc_virtual_output_device->StartNfcPolling();
+
+ return device_result == Common::Input::NfcState::Success ||
+ virtual_device_result == Common::Input::NfcState::Success;
}
bool EmulatedController::StopNfcPolling() {
auto& nfc_output_device = output_devices[static_cast<std::size_t>(DeviceIndex::Right)];
auto& nfc_virtual_output_device = output_devices[3];
- return nfc_output_device->StopNfcPolling() == Common::Input::NfcState::Success ||
- nfc_virtual_output_device->StopNfcPolling() == Common::Input::NfcState::Success;
+ const auto device_result = nfc_output_device->StopNfcPolling();
+ const auto virtual_device_result = nfc_virtual_output_device->StopNfcPolling();
+
+ return device_result == Common::Input::NfcState::Success ||
+ virtual_device_result == Common::Input::NfcState::Success;
}
bool EmulatedController::ReadAmiiboData(std::vector<u8>& data) {